﻿
<div>
    <form name="projectStatusCreateOrEditForm" role="form" novalidate class="form-validation">
        <div class="modal-header">
            <h4 class="modal-title">
                <span ng-if="vm.projectStatus.id">编辑信息:{{vm.projectStatus.name}}</span>
                <span ng-if="!vm.projectStatus.id">新增信息</span>
            </h4>
        </div>
        <div class="modal-body">


            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <input type="text" class="form-control" name="SituationTitle" ng-class="{'edited':vm.projectStatus.situationTitle}" ng-model="vm.projectStatus.situationTitle" maxlength="100" required />
                <label>@L("SituationTitle")</label>
                <span class="help-block">     @L("SituationTitle")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <label class="font-noraml" style="display: none;">文件选择（单选）</label>
                <div>
                    <input type="file" class="form-control" style="display: none;">
                    <div class="input-append input-group" ng-click="vm.fileClick()" >
                        <span class="input-group-btn">
                            <button class="btn btn-primary" type="button">选择文件</button>
                        </span>
                        <input class="input-large form-control" type="text" value="{{vm.fileUrl}}" style="width: 780px !important;padding-left: 10px;">
                    </div>
                </div>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2" ng-show="false">
                <input id="FileID" type="file" name="FileID" nv-file-select uploader="vm.uploader" />
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen3">
                <select name="TownID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.projectStatus.townID" ng-change="vm.bindArea(vm.projectStatus.townID)" required>
                    <option ng-repeat="x in vm.townList" value="{{x.id}}" ng-selected="vm.projectStatus.townID==x.id">{{x.title}}</option>
                </select>
                <label>@L("TownID")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen3">
                <select name="AreaID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.projectStatus.areaID" ng-change="vm.bindVillage(vm.projectStatus.areaID)" required>
                    <option ng-repeat="x in vm.areaList" value="{{x.id}}" ng-selected="vm.projectStatus.areaID==x.id">{{x.title}}</option>
                </select>

                <label>@L("AreaID")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen3">
                <select name="VillageID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.projectStatus.villageID" required>
                    <option ng-repeat="x in vm.villageList" value="{{x.id}}" ng-selected="vm.projectStatus.villageID==x.id">{{x.title}}</option>
                </select>
                <label>@L("VillageID")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <label>备注</label>
                <div class="ueditor" ng-model="vm.projectStatus.remarks" style="width: 100%;"></div>
            </div>


        </div>
        <div class="modal-footer">
            <button ng-disabled="vm.saving" type="button" class="btn btn-default" ng-click="vm.cancel()">@L("Cancel")</button>
            <button type="submit" button-busy="vm.saving" busy-text="@L("SavingWithThreeDot")" class="btn btn-primary blue" ng-click="vm.save()" ng-disabled="projectStatusCreateOrEditForm.$invalid"><i class="fa fa-save"></i> <span>@L("Save")</span></button>
        </div>
    </form>
</div>